﻿@using Login.OSIRISService
@{
    ViewBag.Title = "Gegevens student";
}

<h2>Gegevens student</h2>
<h3>Basisgegevens</h3>
<table>
    <tr>
        <td style="width: 140px"><strong>Nummer</strong></td>
        <td>@ViewBag.Student.Number</td>
    </tr>
    <tr>
        <td><strong>Voornaam</strong></td>
        <td>@ViewBag.Student.FirstName</td>
    </tr>
    <tr>
        <td><strong>Tussenvoegsel</strong></td>
        <td>@ViewBag.Student.Prefix</td>
    </tr>
    <tr>
        <td><strong>Achternaam</strong></td>
        <td>@ViewBag.Student.LastName</td>
    </tr>
    <tr><td colspan="2">&nbsp;</td></tr>
    <tr>
        <td><strong>E-mailadres</strong></td>
        <td>@ViewBag.Student.Email</td>
    </tr>
    <tr>
        <td><strong>Telefoonnummer</strong></td>
        <td>@ViewBag.Student.TelephoneNumber</td>
    </tr>
</table>
<h3>Resultaten</h3>
@if (ViewBag.Student.Results.Length == 0)
{
    <p>Er zijn nog geen resultaten bekend</p>
}
else
{
    <table>
        <thead>
            <tr>
                <th style="width: 40px">Code</th>
                <th style="width: 200px">Naam</th>
                <th style="width: 40px">Resultaat</th>
                <th style="width: 40px">Studiepunten</th>
            </tr>
        </thead>
        <tbody>
            @foreach (ResultDetails result in ViewBag.Student.Results)
            {
                <tr>
                    <td>@result.Course.Code</td>
                    <td>@result.Course.Name</td>
                    <td>@result.Mark</td>
                    <td>@result.Points</td>
                </tr>
            }
        </tbody>
    </table>
}
<br /><br />
<button name="back" onclick="location.href = '@Url.Action("Index")'">Terug naar overzicht</button>
